#pragma once

#include <map>
#include <string>
#include "utils/Mutex.h"
#include "Logger.h"
#include "utils/CSingletonT.h"

namespace log
{
 
class LoggerManager : public utils::CSingletonT<LoggerManager>
{
public:
    LoggerManager();
    ~LoggerManager();
    void init(const std::string& strFile);
    Logger::ptr getLogger(const std::string& name);
    void updateLogger(const std::string& name, Logger::ptr ptrLogger);
    void deleteLogger(const std::string& name);

private:
    utils::RWMutex m_mutex;
    std::map<std::string, Logger::ptr> m_mapLoggers;
};

   
} // namespace log
